package com.ln.dm1031.demo01;

/**
 * @author Ln
 * @version 终极版
 * @date 2022/10/31 14:54
 */
public class Test1 {
    public static void main(String[] args) {
        MyThread myThread = new MyThread();
        myThread.setName("线程1");

        MyThread myThread1 =new MyThread();
        myThread1.setName("线程2");

        myThread.start();
        myThread1.start();
        for (int i = 0; i < 20; i++) {
            System.out.println(Thread.currentThread().getName()+"执行======"+i);
        }
    }
}
